//===-- KnownIdentifiers.def - Known identifier metaprogramming -*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines macros used for macro-metaprogramming with compiler-known
// identifiers.
//
//===----------------------------------------------------------------------===//

#ifndef IDENTIFIER_WITH_NAME
#  error Must define IDENTIFIER_WITH_NAME(Name, IdStr) before including this x-macro file
#endif

#define IDENTIFIER(name) IDENTIFIER_WITH_NAME(name, #name)
#define IDENTIFIER_(name) IDENTIFIER_WITH_NAME(name, "_" #name)

IDENTIFIER(AllCases)
IDENTIFIER(allCases)
IDENTIFIER(allKeys)
IDENTIFIER(alloc)
IDENTIFIER(allocWithZone)
IDENTIFIER(allZeros)
IDENTIFIER(accumulated)
IDENTIFIER(ActorType)
IDENTIFIER(Any)
IDENTIFIER(ArrayLiteralElement)
IDENTIFIER(asLocalActor)
IDENTIFIER(atIndexedSubscript)
IDENTIFIER_(bridgeToObjectiveC)
IDENTIFIER(buildArray)
IDENTIFIER(buildBlock)
IDENTIFIER(buildEither)
IDENTIFIER(buildExpression)
IDENTIFIER(buildFinalResult)
IDENTIFIER(buildIf)
IDENTIFIER(buildLimitedAvailability)
IDENTIFIER(buildOptional)
IDENTIFIER(buildPartialBlock)
IDENTIFIER(callAsFunction)
IDENTIFIER(Change)
IDENTIFIER_WITH_NAME(code_, "_code")
IDENTIFIER(CodingKeys)
IDENTIFIER(codingPath)
IDENTIFIER(combine)
IDENTIFIER(combining)
IDENTIFIER_(Concurrency)
IDENTIFIER(container)
IDENTIFIER(Context)
IDENTIFIER(CoreGraphics)
IDENTIFIER(CoreMedia)
IDENTIFIER(CGFloat)
IDENTIFIER(Copyable)
IDENTIFIER(CoreFoundation)
IDENTIFIER(count)
IDENTIFIER(CVarArg)
IDENTIFIER(Cxx)
IDENTIFIER(CxxStdlib)
IDENTIFIER(Darwin)
IDENTIFIER(dataCorrupted)
IDENTIFIER(Distributed)
IDENTIFIER(dealloc)
IDENTIFIER(debugDescription)
IDENTIFIER(Decodable)
IDENTIFIER(decode)
IDENTIFIER(decodeIfPresent)
IDENTIFIER(Decoder)
IDENTIFIER(decoder)
IDENTIFIER(DefaultDistributedActorSystem)
IDENTIFIER_(Differentiation)
IDENTIFIER_WITH_NAME(PatternMatchVar, "$match")
IDENTIFIER(dynamicallyCall)
IDENTIFIER(dynamicMember)
IDENTIFIER(Element)
IDENTIFIER(Elements)
IDENTIFIER_(enclosingInstance)
IDENTIFIER(Encodable)
IDENTIFIER(encode)
IDENTIFIER(encodeIfPresent)
IDENTIFIER(Encoder)
IDENTIFIER(encoder)
IDENTIFIER(enqueue)
IDENTIFIER(erasing)
IDENTIFIER(error)
IDENTIFIER(errorDomain)
IDENTIFIER(Escapable)
IDENTIFIER(Failure)
IDENTIFIER(first)
IDENTIFIER(forKeyedSubscript)
IDENTIFIER(Foundation)
IDENTIFIER(for)
IDENTIFIER(forKey)
IDENTIFIER(from)
IDENTIFIER(fromRaw)
IDENTIFIER(hash)
IDENTIFIER(hasher)
IDENTIFIER(hashValue)
IDENTIFIER(init)
IDENTIFIER(initialize)
IDENTIFIER(initStorage)
IDENTIFIER(initialValue)
IDENTIFIER(into)
IDENTIFIER(intValue)
IDENTIFIER(invalidValue)
IDENTIFIER(Key)
IDENTIFIER(KeyedDecodingContainer)
IDENTIFIER(KeyedEncodingContainer)
IDENTIFIER(keyedBy)
IDENTIFIER(keyPath)
IDENTIFIER(makeIterator)
IDENTIFIER(makeAsyncIterator)
IDENTIFIER(nestedContainer)
IDENTIFIER(isEmpty)
IDENTIFIER(isolation)
IDENTIFIER(Iterator)
IDENTIFIER(AsyncIterator)
IDENTIFIER(load)
IDENTIFIER(main)
IDENTIFIER_WITH_NAME(MainEntryPoint, "$main")
IDENTIFIER(next)
IDENTIFIER_(nsErrorDomain)
IDENTIFIER(objectAtIndexedSubscript)
IDENTIFIER(objectForKeyedSubscript)
IDENTIFIER(ObjectiveC)
IDENTIFIER_(ObjectiveCType)
IDENTIFIER(Observation)
IDENTIFIER(oldValue)
IDENTIFIER(Optional)
IDENTIFIER_(OptionalNilComparisonType)
IDENTIFIER(parameter)
IDENTIFIER(popFirst)
IDENTIFIER(projected)
IDENTIFIER(projectedValue)
IDENTIFIER(Protocol)
IDENTIFIER(rawValue)
IDENTIFIER(RawValue)
IDENTIFIER(second)
IDENTIFIER(Selector)
IDENTIFIER(self)
IDENTIFIER(Self)
IDENTIFIER(setObject)
IDENTIFIER(shared)
IDENTIFIER(simd)
IDENTIFIER(storage)
IDENTIFIER(stringValue)
IDENTIFIER(super)
IDENTIFIER(superDecoder)
IDENTIFIER(superEncoder)
IDENTIFIER_WITH_NAME(SwiftObject, "_TtCs12_SwiftObject")
IDENTIFIER(SwiftNativeNSObject)
IDENTIFIER(to)
IDENTIFIER(toRaw)
IDENTIFIER(Type)
IDENTIFIER(type)
IDENTIFIER(typeMismatch)
IDENTIFIER(underlyingError)
IDENTIFIER(Value)
IDENTIFIER(value)
IDENTIFIER_WITH_NAME(value_, "_value")
IDENTIFIER(Void)
IDENTIFIER(WinSDK)
IDENTIFIER(with)
IDENTIFIER(withArguments)
IDENTIFIER(withKeywordArguments)
IDENTIFIER(wrapped)
IDENTIFIER(wrappedValue)
IDENTIFIER(wrapperValue)

// Kinds of layout constraints
IDENTIFIER_WITH_NAME(UnknownLayout, "_UnknownLayout")
IDENTIFIER_WITH_NAME(TrivialLayout, "_Trivial")
IDENTIFIER_WITH_NAME(TrivialAtMostLayout, "_TrivialAtMost")
IDENTIFIER_WITH_NAME(RefCountedObjectLayout, "_RefCountedObject")
IDENTIFIER_WITH_NAME(NativeRefCountedObjectLayout, "_NativeRefCountedObject")
IDENTIFIER_WITH_NAME(ClassLayout, "_Class")
IDENTIFIER_WITH_NAME(NativeClassLayout, "_NativeClass")
IDENTIFIER_WITH_NAME(BridgeObjectLayout, "_BridgeObject")
IDENTIFIER_WITH_NAME(TrivialStrideLayout, "_TrivialStride")

// Operators
IDENTIFIER_WITH_NAME(MatchOperator, "~=")
IDENTIFIER_WITH_NAME(LessThanOperator, "<")
IDENTIFIER_WITH_NAME(EqualsOperator, "==")
IDENTIFIER_WITH_NAME(NegationOperator, "!")
IDENTIFIER_WITH_NAME(derived_enum_less_than, "__derived_enum_less_than")
IDENTIFIER_WITH_NAME(derived_enum_equals, "__derived_enum_equals")
IDENTIFIER_WITH_NAME(derived_struct_equals, "__derived_struct_equals")

// Precedence groups
IDENTIFIER(AssignmentPrecedence)
IDENTIFIER(CastingPrecedence)
IDENTIFIER(DefaultPrecedence)
IDENTIFIER(FunctionArrowPrecedence)
IDENTIFIER(NilCoalescingPrecedence)
IDENTIFIER(TernaryPrecedence)

// Builtins and literals
IDENTIFIER_(MaxBuiltinIntegerType)
IDENTIFIER(IntegerLiteralType)
IDENTIFIER(nilLiteral)
IDENTIFIER(integerLiteral)
IDENTIFIER_(builtinIntegerLiteral)
IDENTIFIER_(MaxBuiltinFloatType)
IDENTIFIER(FloatLiteralType)
IDENTIFIER(floatLiteral)
IDENTIFIER_(builtinFloatLiteral)
IDENTIFIER(BooleanLiteralType)
IDENTIFIER_(builtinBooleanLiteral)
IDENTIFIER(booleanLiteral)

IDENTIFIER(ExtendedGraphemeClusterLiteralType)
IDENTIFIER_(builtinExtendedGraphemeClusterLiteral)
IDENTIFIER(extendedGraphemeClusterLiteral)

IDENTIFIER(UnicodeScalarLiteralType)
IDENTIFIER_(builtinUnicodeScalarLiteral)
IDENTIFIER(unicodeScalarLiteral)

IDENTIFIER(stringLiteral)
IDENTIFIER_(builtinStringLiteral)
IDENTIFIER(StringLiteralType)
IDENTIFIER(stringInterpolation)
IDENTIFIER(StringInterpolation)
IDENTIFIER(literalCapacity)
IDENTIFIER(interpolationCount)
IDENTIFIER(appendLiteral)
IDENTIFIER(appendInterpolation)
IDENTIFIER_WITH_NAME(dollarInterpolation, "$interpolation")
IDENTIFIER(arrayLiteral)
IDENTIFIER(dictionaryLiteral)
IDENTIFIER(className)

IDENTIFIER(_defaultActorInitialize)
IDENTIFIER(_defaultActorDestroy)
IDENTIFIER(unownedExecutor)

IDENTIFIER_(ErrorType)
IDENTIFIER(Code)
IDENTIFIER_(nsError)

// Custom string interpolation type used by os log APIs.
IDENTIFIER(OSLogMessage)
// Types that are specially handled in diagnostics for the os log APIs.
IDENTIFIER(OSLog)
IDENTIFIER(OSLogType)

// Atomics ordering type identifiers.
IDENTIFIER(AtomicLoadOrdering)
IDENTIFIER(AtomicStoreOrdering)
IDENTIFIER(AtomicUpdateOrdering)

// Differentiable programming
IDENTIFIER(by)
IDENTIFIER(differential)
IDENTIFIER(offset)
IDENTIFIER(move)
IDENTIFIER(pullback)
IDENTIFIER(TangentVector)
IDENTIFIER(zero)

// String processing
IDENTIFIER(Regex)
IDENTIFIER_(regexString)
IDENTIFIER(version)
IDENTIFIER_(StringProcessing)
IDENTIFIER(RegexBuilder)

// Backtracing
IDENTIFIER_(Backtracing)

// Distributed actors
IDENTIFIER(ActorID)
IDENTIFIER(ActorSystem)
IDENTIFIER(ID)
IDENTIFIER(Invocation)
IDENTIFIER(__isRemoteActor)
IDENTIFIER(_distributedActorDestroy)
IDENTIFIER(_distributedActorRemoteInitialize)
IDENTIFIER(actor)
IDENTIFIER(actorReady)
IDENTIFIER(actorSystem)
IDENTIFIER(actorType)
IDENTIFIER(assignID)
IDENTIFIER(decodeNext)
IDENTIFIER(doneRecording)
IDENTIFIER(id)
IDENTIFIER(metatype)
IDENTIFIER(handler)
IDENTIFIER(invocation)
IDENTIFIER(invocationDecoder)
IDENTIFIER(invokeHandlerOnReturn)
IDENTIFIER(makeInvocationEncoder)
IDENTIFIER(on)
IDENTIFIER(onReturn)
IDENTIFIER(recordArgument)
IDENTIFIER(recordErrorType)
IDENTIFIER(recordGenericSubstitution)
IDENTIFIER(recordReturnType)
IDENTIFIER(remoteCall)
IDENTIFIER(remoteCallVoid)
IDENTIFIER(resultBuffer)
IDENTIFIER(resignID)
IDENTIFIER(resolve)
IDENTIFIER(returning)
IDENTIFIER(ResultHandler)
IDENTIFIER(system)
IDENTIFIER(target)
IDENTIFIER(throwing)
IDENTIFIER(using)
IDENTIFIER(InvocationDecoder)
IDENTIFIER(InvocationEncoder)
IDENTIFIER(whenLocal)
IDENTIFIER(decodeNextArgument)
IDENTIFIER(SerializationRequirement)
IDENTIFIER_WITH_NAME(builderSelf, "$builderSelf")

// Attribute options
IDENTIFIER_(_always)
IDENTIFIER_(assumed)
IDENTIFIER(checked)
IDENTIFIER(never)
IDENTIFIER(none)
IDENTIFIER(safe)
IDENTIFIER(size)
IDENTIFIER(speed)
IDENTIFIER(unchecked)
IDENTIFIER(unsafe)

// The singleton instance of TupleTypeDecl in the Builtin module
IDENTIFIER(TheTupleType)

// Runtime attributes
IDENTIFIER(attachedTo)

#undef IDENTIFIER
#undef IDENTIFIER_
#undef IDENTIFIER_WITH_NAME
